button: Restore focus
authorMatthias Clasen <mclasen@redhat.com>
Sat, 6 Aug 2016 14:34:18 +0000 (10:34 -0400)
committerEmmanuele Bassi <ebassi@gnome.org>
Tue, 18 Oct 2016 10:49:12 +0000 (11:49 +0100)
The custom gadget draw function has the side effect of informing
the gadget machinery wether to draw focus or not. Bring the
draw function back, just for its boolean return value. We may
want to find a better solution for this.

gtk/gtkbutton.c

index b98cb753793bb8a4943f87939487e09884ef60f0..23580090d486e37f13cac9dce78b833129877140 100644 (file)
@@ -870,7 +870,7 @@ gtk_button_get_render_node (GtkWidget   *widget,
 {
   GskRenderNode *res = gtk_css_gadget_get_render_node (GTK_BUTTON (widget)->priv->gadget,
                                                        renderer,
-                                                       FALSE);
+                                                       gtk_widget_has_visible_focus (widget));
 
   if (res == NULL)
     return NULL;